home *** CD-ROM | disk | FTP | other *** search
/ Chip 1996 April / CHIP 1996 aprilis (CD06).zip / CHIP_CD06.ISO / sac / avir / vit200.exe / VIT.DOC < prev    next >
Text File  |  1995-08-14  |  16KB  |  587 lines

  1.  
  2.  
  3.  
  4.  
  5.             VIRUS TRAP ( VIT )
  6.             ------------------
  7.  
  8.  
  9.                  Version 2.00
  10.  
  11.  
  12.  
  13.  
  14.                 Copyright (C) Dvinyaninov,IIq/1992-1995
  15.                     All rights reserved.
  16.  
  17.  
  18.  
  19.  
  20.             Ekaterinburg
  21.  
  22.                 1995
  23.  
  24.  
  25.  
  26.  
  27.  1. What is the Questtion ................................ 1
  28.  2. Program Logic ........................................ 2
  29.  3. Hardware/Software Requirment ......................... 4
  30.  4. FAST RUN ............................................. 5
  31.  5. Return Codes ......................................... 5
  32.  6. IF VIRUS DETECT ...................................... 6
  33.  7. Keys ................................................. 7
  34.  8. VIT Interrupts ....................................... 11
  35.  9. Used Software ........................................ 12
  36.  10. History ............................................. 13
  37.  11. Utility ............................................. 13
  38.  
  39.  
  40.                 Copyright (C) Dvinyaninov,IIq/1992-1995
  41.                     All rights reserved.
  42.  
  43.  
  44.  
  45.  
  46.             - 1 -
  47.  
  48.  
  49.         1. What is the Question
  50.         -----------------------
  51.  
  52.     Viruses abundance and increasing hard disk cappacity
  53.  and their informations require more early diagnose of
  54.  virus appearence. Press publishes washings for those
  55.  programs promote for necessity and spreading of them.
  56.  Author proposed his software solution.
  57.  
  58.             ------------
  59.  
  60.     Most evidence solution of virus detection is to set
  61.  virus on file or disk. Attempts with hard disk is risk
  62.  and bustle. Attempts with floppy disk is unconvenient
  63.  and slowly. It is remain make memory disk.
  64.  
  65.     MS DOS, DR DOS, PC DOS allow to do memory disk ( in
  66.  standard, expanded or extended memory ), but there are
  67.  static disk. More, if there is small memory machine,
  68.  then memory is critical resourse and nobody do not make
  69.  static disk.
  70.  
  71.     The only solution is dynamic memory disk and his
  72.  using as viruses bait. This is memory disk and disk
  73.  changes may be direct viewing by memory changes, not
  74.  by disk access.
  75.  
  76.     SO I TEST IS SYSTEM INFECTED, BUT NOT IS HARD DISK INFECTED.
  77.  
  78.  
  79.  
  80.  
  81.             - 2 -
  82.  
  83.         2. Program Logic
  84.         ----------------
  85.  
  86.     Dynamic memory disk consist from two files
  87.  optional driver VIT.DRV and main program VIT.EXE and do
  88.  follow:
  89.  
  90.  1). Driver VIT.DRV loading at system boot by CONFIG.SYS
  91.      instruction. This driver get drive identificator
  92.      and system tables space. Driver don't get memory
  93.      and don't execute any driver commands, except init.
  94.      Any commands ( except init at boot time ) return
  95.      error code.
  96.  
  97.  2). Main program VIT.EXE run by you, when you want to
  98.      detect virus reproduction. This program :
  99.  
  100.       - get memory blocks for memory disk,
  101.  
  102.       - make file structure in memory block,
  103.  
  104.       - if you use /NC key, program find COMMAND.COM
  105.     and write to memory disk,
  106.  
  107.       - make pattern files in memory disk ( files
  108.     PAT_COM.COM, PAT_CE9.COM, PAT_EXE.EXE, PAT_EE9.EXE ),
  109.  
  110.       - if used key /DRV, find driver VIT.DRV, reset driver entry
  111.     points to his entry points and assign memory disk as logical
  112.     disk,
  113.  
  114.       - if used key /DYN, VIT.DRV don't used at all and VIT.EXE
  115.     fully change system tables for make dynamic drive,
  116.  
  117.       - if used key /NC, replace COMSPEC enviroment
  118.     variable ( COMMAND.COM path and file name ),
  119.  
  120.       - if used key /NC, VIT.EXE run pattern programs
  121.     via loading second COMMAND.COM, otherwise VIT.EXE
  122.     run pattern programs without second COMMAND.COM
  123.     copy. Also run DIR command,
  124.  
  125.       - at last logical dynamic memory disk compare with
  126.     compare control sums. Control sums calculated for BOOT, FAT,
  127.     DIR and data areas ( 4 control sums ).
  128.     Majority viruses ( but not all ) infects this
  129.     disk files and may be detect,
  130.  
  131.       - if control sums is different, then program consider,
  132.     that it is virus. Current program version inform
  133.     about changing areas and return bad code on
  134.     program exit,
  135.  
  136.  
  137.  
  138.             - 3 -
  139.  
  140.  
  141.       - if program find disk changes, you will receice message
  142.     and PAUSE, so on you may POWER OFF
  143.     you computer in this moment,
  144.  
  145.       - at end memory disk deassigned, driver entry points
  146.     rest at initial state or rest system tables, memory freeding
  147.     and main program VIT.EXE ended. Return code reflects error
  148.     reasons.
  149.  
  150.  
  151.    Week points :
  152.  
  153.       - COMMAND.COM file may be infect. Use key /NC
  154.     and point filename for pure copy COMMAND.COM.
  155.     It may be any filename, program rename file
  156.     to COMMAND.COM. Rename make in memory block,
  157.     not by disk access.
  158.  
  159.       - not any viruses infects my pattern disk, COM and
  160.     EXE files on him. Some viruses stand on boot areas
  161.     floppy and hard disks. Some viruses require definite
  162.     bound program length or definite pattern at entry
  163.     pattern. This extension not at this program version,
  164.  
  165.  
  166.    I must to be note, it is not correct save memory disk copy
  167.  on hard disk ( instead of memory ), if you use violated
  168.  file structure on hard disk.
  169.  
  170.  
  171.  
  172.             - 4 -
  173.  
  174.         3. Hardware/Software Requirment
  175.         -------------------------------
  176.  
  177.    Computer is IBM PC.
  178.  
  179.    DOS is MS DOS ( >= 3.30 ), DR DOS ( >= 5.0 ), NW DOS ( 7.0 ).
  180.  
  181.    Memory ( dynamic RUN ) is 240 Kbyte from main memory 640 Kbyte.
  182.    Static memory for driver is 2 Kbyte, for TSR starter is 1 Kbyte.
  183.  
  184.    Restriction for dynamic drive capacity is 31 Kbyte.
  185.    Terminal output is Int 10h and output don't redirected to file.
  186.    VIT don't check own length and control sum.
  187.  
  188.     VIT in case :
  189.     - key /DYN change system tables and insert addition
  190.       driver and addition device, so must be corresponing
  191.       of virtual and real memory,
  192.     - key /DRV change diver code, so driver memory require
  193.       corresponding of virtual and real memory.
  194.  
  195.     VCPI - VIT detect VCPI, but don't any use.
  196.  
  197.     DPMI - VIT detect 2 sign :
  198.         - set,
  199.         - active.
  200.  
  201.         If DPMI is active, then virtual memory and
  202.         real memory differs, so VIT write message
  203.         error and stop.
  204.  
  205.     DESQVIEW - VIT don't test.
  206.  
  207.     WINDOWS  - VIT work.
  208.  
  209.     OS/2 ( OS/2 DOSBOX ) - VIT don't work.
  210.  
  211.    VIT detect active DPMI, DESQVIEW and OS/2 and write error
  212.    message and correct stop. If you try you may use key /!UND,
  213.    but result not guaranted.
  214.  
  215.  
  216.    VIT version 2.00 is FOUR YEARS AGO PROGRAM, distributed as
  217.    Shareware, with updates :
  218.  
  219.    - english documentation,
  220.    - delete software protection,
  221.    - without detected bugs ( program run in memory and any bug don't
  222.     change or violate file structure of any other drive ),
  223.    - add DYNAMIC ( key /DYN )
  224.    - drive capacity is restrict and default is 31 Kbyte,
  225.    - key /NC don't work because COMMAND.COM length now is big,
  226.     but all program logic work with this key.
  227.  
  228.    IF YOU HAVE QUESTIONS ABOUT MAKE :
  229.     - big drive capacity and use key /NC,
  230.     - use XMS memory,
  231.     - use DPMI.
  232.     and etc.
  233.  
  234.    THERE IS NO PROBLEM, BUT THIS VERSION IS FOUR YEARS AGO VERSION,
  235.    DISTRIBUTED AS SHAREWARE.
  236.  
  237.  
  238.  
  239.             - 5 -
  240.  
  241.         4. FAST RUN
  242.         -----------
  243.  
  244.     FOR MS DOS Insert in CONFIG.SYS line :
  245.     ----------
  246.         [HI]DEVICE=<path VIT.DRV>\vit.drv
  247.  
  248.         Insert in AUTOEXEC.BAT line :
  249.  
  250.         <path VIT.EXE>\VIT.EXE /TSR /DRV /FAST
  251.  
  252.  
  253.     FOR DR DOS / NW DOS Insert in AUTOEXEC.BAT line :
  254.     -------------------
  255.         <path VIT.EXE>\VIT.EXE /TSR /DYN /FAST
  256.  
  257.     This set automatic running VIT.EXE.
  258.  
  259.  
  260.     FOR WINDOWS including VIT.EXE by setting VIT.ICO and VIT.PIF
  261.     -----------
  262.             in WINDOWS setting. Now I don't no how make
  263.             automatic running in Windows and you require
  264.             manual run.
  265.  
  266.  
  267.         5. Return Codes
  268.         ---------------
  269.  
  270.     Code is
  271.  
  272.     0 - Ok. Program make tests and not detect viruses.
  273.     1 - Error in parameters.
  274.     2 - PROGRAM MAKE TESTS AND FIND VIRUS. PROGRAM ALWAYS
  275.         PAUSE.
  276.  
  277.  
  278.  
  279.             - 6 -
  280.  
  281.         6. IF VIRUS DETECT
  282.         ------------------
  283.  
  284.     If VIT detect virus, it is try to write disk dump as file
  285.  into current catalog with name 'VIT.DM2'. Next, if not used key
  286.  /NOTERR, VIT stop computer. But 32-bit use of computer ( as EMM386 )
  287.  don't stop computer. I am sorry, this is four years ago program ...
  288.  But Pause you will receive in any case.
  289.  
  290.     Next :
  291.     1.You may try to run all antiviruses to find VIRUS SIGNATURE
  292.       in file 'VIT.DM2'. If SIGNATURE is found you may to run
  293.       this antivirus on you hard disk. If SIGNATURE not found
  294.       see 2.
  295.  
  296.       OR
  297.  
  298.     2.You may send file 'VIT.DM2' to virus center and wait
  299.       answer.
  300.  
  301.  
  302.     !!! VIRUS MAY KILL VIT.EXE. I DON'T PRESERVE THIS SITUATION.
  303.  
  304.  
  305.  
  306.             - 7 -
  307.  
  308.         7. Keys
  309.         -------
  310.  
  311.    Keys VIT.EXE running :
  312.  
  313.  VIT    [/?] [/HELP] [/H] [/!TR] [/!UND] [/0] [/BOOT{1,2}] [/BOOT={1,2}]
  314.     [/CE9=ce9] [/COM=com] [/CS] [/CYC=c1:[c2:[c3]]]
  315.     [/D] [/DE=de] [/DRV] [/DYN]
  316.     [/EE9=ee9] [/EXE=exe] [/ENG] [/FAST] [/FAT{1,2}] [/FAT={1,2}]
  317.     [/HD=hh] [/KBYTE=kk] [/L] [/MED=med]
  318.     [/NC[=file]] [/NIP] [/NERR] [/NOTERR] [/NMSG] [/NSND]
  319.     [/OEM] [/ON] [/OF[F] [/PAGE0] [/PAR=file]
  320.     [/PB[AT]=file] [/PC[OM]=file] [/PE[XE]=file]
  321.     [/RRPAT=File,NewExt] [/ROI=XX[,YY]] [/RBI=XX[,YY]] [/RVI=XX[,YY]]
  322.     [/RUS] [/S] [/SEC=ss] [/SND] [/SPC=spc] [/SIL] [/ST]
  323.     [/TRK=tt] [/TSR]
  324.  
  325.  
  326.  
  327.     /?, /HELP, /H - View KEYS.
  328.  
  329.     /0    - Zero virtual disk data secs.
  330.  
  331.     /BOOT    - Case NOSYSTEM BOOT.
  332.           0 - System boot filled by zero.
  333.           1 - System boot is message 'Nonsystem disk'
  334.           2 - System boot is as Windows.
  335.  
  336.     /CE9/COM - PATTERN FILES SIZES.
  337.            /COM - simple .COM file varying length
  338.            /CE9 - simple .COM file varying length
  339.             with command JMP ( 0E9h ) at begin
  340.  
  341.     /CYC    - cycle by pattern size.
  342.           VIT into cycle make disk, make patterns
  343.           2 .COM files and 2 .EXE files, make run
  344.           and check.
  345.  
  346.     /D    - SAVE DISK IMAGES IN FILES.
  347.           This key require keys /NIP and any of key
  348.           /PCOM or /PEXE. VIT save disk image
  349.           before execution in file 'VIT.DM1',
  350.           run external pattern file and save
  351.           disk image in file 'VIT.DM2'.
  352.           Path for this file is current directory,
  353.           not VIT directory.
  354.  
  355.  
  356.  
  357.             - 8 -
  358.  
  359.  
  360.     /DRV    - Use DRIVER from CONFIG.SYS.
  361.           Method of busy drive letter and drive access
  362.           ( old method and it is standard for DOS,
  363.            but require edit CONFIG.SYS )
  364.  
  365.     /DYN    - Use DYNAMIC MAKED DRIVER.
  366.           New method of busy drive letter and drive
  367.           access. This method is very easy for use.
  368.           The virus explorer is dangerous.
  369.           The only free machine, that i have, has
  370.           DR DOS and this new key used only for
  371.           DR DOS. 
  372.  
  373.     /EE9/EXE - PATTERN FILES SIZES.
  374.            /EXE - simple .EXE file varying length
  375.            /EE9 - simple .EXE file varying length
  376.               with command JMP ( 0E9h ) at begin
  377.  
  378.     /ENG    - ENGLISH MESSAGES - DEFAULT
  379.  
  380.     /FAST    - FASTER EXEC ( WITHOUT DIR ).
  381.           VIT make disk, calculate CRC, run all files
  382.           and check crc. If key don't use VIT
  383.           check crc after every run and also use
  384.           command DIR at common end.
  385.  
  386.     /FAT2    - make second copy of FAT - DEFAULT.
  387.  
  388.     /NC    - GET COMMAND.COM COPY ( WITH RENAME ).
  389.         use second copy COMMAND.COM. Find it, put on
  390.         memory disk and point at run. If there is not
  391.         file atgument, program use COMMAND.COM, pointed
  392.         by enviroment variable COMSPEC ( it may be
  393.         infect ). If file argument is use,  program
  394.         find this file, put it on memory disk and rename
  395.         as COMMAND.COM. In any case of this key enviroment
  396.         variable COMSPEC reset to memory disk COMMAND.COM.
  397.         This option is work ok, but big size of last
  398.         DOS is greater than size of disk ( = 31 Kbyte ).
  399.         This is four years ago program ...
  400.  
  401.     COMMAND.COM SIZE
  402.  
  403.     VER        ORIGINAL    PACKED ( PKLITE 1.15 )
  404.     ------------------------------------------------------
  405.  
  406.     MS DOS    3.30    25.308        17.073
  407.         4.01    37.557        25.904
  408.         5.0b    41.035        27.916
  409.         5.0    47.845        30.978
  410.         6.0    50.839        32.812
  411.         6.22    54.869        35.620
  412.  
  413.     DR DOS    5.0    32.496        22.312
  414.         6.0    50.456        38.055 ( ? OVERLAY )
  415.  
  416.     NW DOS    7.0    56.081        41.577 ( ? OVERLAY )
  417.  
  418.  
  419.  
  420.             - 9 -
  421.  
  422.     /NIP    - DO NOT USE INTERNAL PATTERNS.
  423.           If you want to test system infection on you pattern
  424.           files, use key /NIP and one of keys /PCOM, /PEXE.
  425.           VIT make disk, read file from key {/PCOM,/PEXE},
  426.           rename extension to {.COM,.EXE} and run this file.
  427.  
  428.     /NOTERR /NERR - NOT STOP MACHINE.
  429.           If you wanted to continue work at any time,
  430.           use this key.
  431.  
  432.     /NSND    - NOT USE SOUND AT PATTERN RUN - DEFAULT.
  433.  
  434.     /NMSG    - ~ /SIL
  435.  
  436.     /ON    - If TSR part is present, set TSR run ON.
  437.  
  438.     /OFF    - If TSR part is present, set TSR run OFF.
  439.  
  440.     /PAGE0    - Type on CURRENT VIDEO PAGE ( = 0 ).
  441.           Otherwise VIT switch video page and type on
  442.           video page1.
  443.  
  444.     /PAR=file - Get KEYS from file ( with / )
  445.  
  446.     /PB[AT]/PC[OM]/PE[XE]=file - EXTERNAL PATTERN FILES ( WITH RENAME )
  447.           See key /NIP.
  448.  
  449.     /RRPAT=file[,ext] - File PATTERN without EXEC ( with EXTENSION RENAME )
  450.           VIT only copy this file ( and rename extension
  451.           if requre in key ) to disk in addition to VIT patterns.
  452.  
  453.     /RUS    - RUSSIAN MESSAGES.
  454.           VIT may type part of message in Russian.
  455.  
  456.     /S    - WORKING EXIT TO SYSTEM.
  457.           If you use key /NIP and one of keys /PCOM,/PEXE,
  458.           you may use this key and detail see VIT disk.
  459.  
  460.     /SIL    - RUN WITHOUT ANY TYPE.
  461.           If video page switch disturb for you, any type
  462.           is dissable. In case of virus VIT enable type.
  463.  
  464.     /SND    - SOUND ON TIMER CHANNEL 2.
  465.  
  466.     /ST    - Type TSR state ( = ON/OFF ).
  467.           Check is TSR present and status of TSR.
  468.  
  469.     /TSR    - Make TSR part of VIT.
  470.           This is very simple part. It is call VIT.EXE
  471.           before running YOU program.
  472.  
  473.  
  474.  
  475.             - 10 -
  476.  
  477.  =======  OPTIONS for MANUAL DEFINITION DISK PAR ======
  478.     ( for virus explorer )
  479.  
  480.     /DE    - FILES IN ROOT DIRECTORY.
  481.  
  482.     /OEM    - OEM ID ( BOOT Sector )
  483.  
  484.     /MED    - Media ID
  485.  
  486.     /TRK/HD/SEC OR /KBYTE - FOR LOGICAL DRIVE
  487.  
  488.     /SPC    - SECTORS PER CLUSTER 
  489.  
  490.  
  491.  
  492.  
  493.             - 11 -
  494.  
  495.         8. VIT Interrupts
  496.         -----------------
  497.  
  498.  Int 2f, Fun ( AX ) = 0DD01h
  499.  
  500.     If use VIT.DRV or use key /DRV.
  501.  
  502.  
  503.  
  504.  Int 2f, Fun ( AX ) = 0DD02h
  505.  
  506.     If use key /TSR.
  507.  
  508.  
  509.     KEYS for GEN INTERUPTS as RESULT VIT :
  510.  
  511.  /ROI=xx[,yy] - Result Ok : Int XX fun YY
  512.  
  513.  /RVI=xx[,yy] - Result Virus : Int XX fun YY
  514.  /RBI=xx[,yy] - Result Bad : Int XX fun YY =~ /RVI
  515.  
  516.  
  517.  
  518.             - 12 -
  519.  
  520.         9. Used Software
  521.         ----------------
  522.  
  523.     This software is maked on Sankt-Peterburg compiler WBC
  524.  version 1.4. This compiler is restricted release of Algol 68,
  525.  version is old and has bugs.
  526.  
  527.     For make self-extracted VIT I use LHarc.
  528.  
  529.               LHarc Version 1.12B
  530.                 04/29/89
  531.  
  532.        Copyright (c) Haruyasu Yoshizaki (Yoshi), 1988-89
  533.  
  534.                             Nifty Serve PFF00253
  535.                             ASCII PCS    pcs02846
  536.  
  537.  7. My Distribution Policy
  538.  
  539.  
  540.    7.  For the commercial use of this software, I add the following:
  541.  
  542.      a.  The entire software made incorporating this program
  543.          should not be copy protected in the sense that the
  544.          DISKCOPY program of MS-DOS makes an imperfect copy.
  545.  
  546.      b.  Every part of the package should print the name
  547.          "LHarc" and the copyright banner.
  548.  
  549.      c.  The distribution policy of this software should be
  550.          printed either in the manual, in the package, or on
  551.          the disk label.
  552.  
  553.  
  554.  
  555.  
  556.             - 13 -
  557.  
  558.  
  559.         10. History
  560.         -----------
  561.  
  562.  1991, Dec - Idea 
  563.  
  564.  1992, qI - Check idea on static memory disk.
  565.  
  566.  1992, qII-qIII - DEMO version and his distribution.
  567.  
  568.  1992, qIV - work simple version
  569.  
  570.  1993, 1994, 1995 -
  571.     new keys and distribution,
  572.     software technology bugs detect
  573.     
  574.  1995, qII-qIII - english documentation and put into worldwide shape
  575.         keys /DYN /DRV /ROI /RVI /RBI /BOOT.
  576.         Idea is rest "know how" and I name this program
  577.         as "Fund Math Prod".
  578.  
  579.  
  580.  
  581.         11. Utility
  582.         -----------
  583.  
  584.  VIT_VVP.EXE - view video page 0..3 with delay.
  585.         Exit with pressing any key.
  586.         This is suitable for view VIT result on page 1.
  587.